<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>乐淘电商</title>
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="./lib/fa/css/font-awesome.min.css">
  <link rel="stylesheet" href="./lib/mui/css/mui.css">
  <link rel="stylesheet" href="./css/common.css">
  <link rel="stylesheet" href="./css/search.css">
</head>
<body>
<!-- 字体图标库的使用
     1. 引包
     2. 加类名
-->
<!--<span class="fa fa-heartbeat"></span>-->
<!--<span class="fa fa-hourglass-end"></span>-->


<!-- 由于有区域滚动, 中间内容是自适应的, 所以需要一个全屏容器 -->
<div class="lt_container">
  <div class="lt_header">
    <!-- 返回上一页 -->
    <!-- history.back();  history.go(-1);   -->
    <a href="javascript:history.back();" class="icon_left"><i class="mui-icon mui-icon-back"></i></a>
    <h3>搜索中心</h3>
  </div>

  <div class="lt_main">
    <div class="mui-scroll-wrapper">
      <div class="mui-scroll">
        <!--这里放置真实显示的DOM内容-->

        <!-- 乐淘搜索框 -->
        <div class="lt_search">
          <input type="text" placeholder="请输入搜索关键字" class="search_input">
          <button class="mui-btn mui-btn-primary search_btn">搜索</button>
        </div>

        <!-- 搜索历史 -->
        <div class="lt_history">
          <!-- 挖个巨坑 -->
        </div>

      </div>
    </div>
  </div>

  <div class="lt_footer">
    <ul>
      <li>
        <a href="index.html">
          <i class="fa fa-home"></i>
          <p>首页</p>
        </a>
      </li>
      <li>
        <a href="category.html">
          <i class="fa fa-bars"></i>
          <p>分类页</p>
        </a>
      </li>
      <li>
        <a href="cart.html">
          <i class="fa fa-shopping-cart"></i>
          <p>购物车</p>
        </a>
      </li>
      <li>
        <a href="user.html">
          <i class="fa fa-user"></i>
          <p>用户中心</p>
        </a>
      </li>
    </ul>
  </div>
</div>


<script type="text/html" id="searchTpl">
  {{ if list.length === 0 }}
    <p>没有更多数据了</p>
  {{ else }}

    <div class="title">
      <span class="mui-pull-left">搜索历史</span>
      <span class="mui-pull-right btn_empty"><i class="fa fa-trash"></i>清空记录</span>
    </div>
    <div class="content">
      <ul>
        {{ each list v i }}
        <li>
          <a href="search_list.html?key={{ v }}" class="mui-pull-left">{{ v }}</a>
          <i data-index="{{ i }}" class="btn_delete mui-icon mui-icon-closeempty mui-pull-right"></i>
        </li>
        {{ /each }}
      </ul>
    </div>

  {{ /if }}





</script>



<script src="./lib/mui/js/mui.js"></script>
<script src="./lib/zepto/zepto.min.js"></script>
<script src="./lib/artTemplate/template-web.js"></script>
<script src="./js/common.js"></script>
<script src="./js/search.js"></script>

</body>
</html>